#ifndef __CODE_COUNT_H__
#define __CODE_COUNT_H__

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <string.h>


typedef enum
{
  COUNT_TIME_1NS     = 0,
  COUNT_TIME_10NS    = 1,
  COUNT_TIME_100NS   = 2,
  COUNT_TIME_1US     = 3,
  COUNT_TIME_10US    = 4,
  COUNT_TIME_100US   = 5,
  COUNT_TIME_1MS     = 6,
  COUNT_TIME_10MS    = 7,
  COUNT_TIME_100MS   = 8,
  COUNT_TIME_1S      = 9,
} Count_Time_t;


typedef enum
{
  SPEED_UNIT_B   = 0,
  SPEED_UNIT_KB  = 1,
  SPEED_UNIT_MB  = 2,
  SPEED_UNIT_GB  = 3,
} Speed_Unit_t;


typedef enum
{
  TIME_UNIT_1NS    = 0,
  TIME_UNIT_1US    = 1,
  TIME_UNIT_1MS    = 2,
  TIME_UNIT_1S     = 3,
} Time_Unit_t;


float Code_Count_Transfer_Speed(Count_Time_t time, uint32_t count, uint32_t byte, Speed_Unit_t unit);
float Code_Count_Run_Time(Count_Time_t time, uint32_t count, Time_Unit_t unit);


#ifdef __cplusplus
}
#endif

#endif


